package com.corechina.apex_osswords.domain.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.corechina.apex_osswords.domain.entity.CoreServiceObject;
import com.corechina.apex_osswords.domain.vo.CoreServiceObjectVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 服务对象表 Mapper 接口
 * </p>
 *
 * @author fyh
 * @since 2023-02-15
 */
@Component
public interface CoreServiceObjectMapper extends BaseMapper<CoreServiceObject> {

    @Update("update core_service_object set is_del = #{isDel} where id = #{id}")
    int updateIsDel(@Param("isDel") Integer isDel, @Param("id") Integer id);

    IPage<CoreServiceObjectVo> getList(Page page, @Param("isDel") Integer isDel, @Param("enterpriseId") Integer enterpriseId, @Param("name") String name);

}
